import axios from 'axios';
let request = axios.create()

//获取  http://localhost:3000/api/userInfo/showUserinfos
export const getuser = () => request({url:'http://localhost:3000/api/userInfo/showUserinfos',method:'get'})


//添加   http://localhost:3000/api/userInfo/addUserinfo?username=1111&password=2222
export const adduser = (username,password) => request({url:`http://localhost:3000/api/userInfo/addUserinfo?username=${username}&password=${password}`,method:'post'})

//修改  http://localhost:3000/api/userInfo/updateUserInfo?username=yyyy&password=xxxx&jurisdiction=1&id=35
export const alteruser = (id,jurisdiction,password,user_name,user_title,user_url,username) => request({url:`http://localhost:3000/api/userInfo/updateUserInfo?username=${username}&password=${password}&jurisdiction=${jurisdiction}&user_name=${user_name}&user_title=${user_title}&user_url=${user_url}&id=${id}`,method:'post'})

//删除   http://localhost:3000/api/userInfo/deleteUserinfo
export const deleteuser = (id) => request({url:`http://localhost:3000/api/userInfo/deleteUserinfo?id=${id}`,method:'delete'})

